Taylor performed brilliantly during the Mexican War winning a string of battles. The public saw Taylor as the hero of the Mexican War. The Whig Party saw him as a presidential candidate. Taylor won a close election and became the only president in history who had been a soldier and nothing but a soldier.